import Layout from "../views/layout";

const routes = [
  {
    path: "/login",
    name: "Login",
    component: () => import("@/views/login")
  },
  {
    path: "/",
    component: Layout,
    redirect: "/userInfo",
    hidden: true,
    children: [
      {
        path: "userInfo",
        name: "主页",
        meta: {
          title: "个人信息"
        },
        component: () => import("@/views/userInfo")
      }
    ]
  },
  {
    path: "/article",
    component: Layout,
    redirect: "/article/table",
    name: "Atricle",
    meta: {
      title: "文章管理",
      icon: "el-icon-menu"
    },
    children: [
      {
        path: "table",
        name: "atricleList",
        component: () => import("@/views/article/index"),
        meta: {
          title: "文章列表",
          icon: "el-icon-share"
        }
      },
      {
        path: "add",
        name: "addAtrticle",
        component: () => import("@/views/article/edit"),
        meta: {
          title: "添加文章",
          icon: "el-icon-edit"
        }
      },
      {
        path: "edit",
        name: "editAtrticle",
        hidden: true,
        component: () => import("@/views/article/edit"),
        meta: {
          title: "编辑文章",
          icon: "el-icon-edit"
        }
      }
    ]
  }
  // {
  //   path: "/zone",
  //   component: Layout,
  //   redirect: "/zone/tabel",
  //   name: "Zone",
  //   meta: {
  //     title: "空间管理",
  //     icon: "el-icon-menu"
  //   },
  //   children: [
  //     {
  //       path: "/tabel",
  //       name: "ZoneList",
  //       component: () => import("@/views/zone/index"),
  //       meta: {
  //         title: "空间列表",
  //         icon: "el-icon-edit"
  //       }
  //     }
  //   ]
  // }
];
export default routes;
